var Epub = require("epub-gen")

var option = {
    title: "python3", // *Required, title of the book.
    author: "Jsure", // *Required, name of the author.
    publisher: "Macmillan & Co.",// optional
    cover: "http://demo.com/url-to-cover-image.jpg", // Url or File path, both ok.
    content: [
        {
            title: "About the author", // Optional
            author: "John Doe", // Optional
            data: "<h2>Charles Lutwidge Dodgson</h2>"
            +"<div lang=\"en\">Better known by the pen name Lewis Carroll...</div>" // pass html string
        }
    ]
};

new Epub(option, ".epub/path.epub").promise.then(
    function(){
        console.info("电子书构建成功")
    },
    function(error){
        console.error("电子书构建失败");
        console.error(error);
    }
    );